# -*- coding: utf-8 -*-

################################################################################
## Form generated from reading UI file 'main.ui'
##
## Created by: Qt User Interface Compiler version 6.7.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################

from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
    QMetaObject, QObject, QPoint, QRect,
    QSize, QTime, QUrl, Qt)
from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
    QFont, QFontDatabase, QGradient, QIcon,
    QImage, QKeySequence, QLinearGradient, QPainter,
    QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QHBoxLayout, QHeaderView, QLabel,
                               QLineEdit, QPushButton, QSizePolicy, QSpacerItem,
                               QSpinBox, QTableWidget, QTableWidgetItem, QVBoxLayout,
                               QWidget, QAbstractItemView)
from qfluentwidgets import TitleLabel, BodyLabel, SpinBox, LineEdit, PushButton, FluentIcon, TableWidget, \
    PrimaryPushButton, CardWidget


class Ui_Form(QWidget):
    def setupUi(self, Form):
        if not Form.objectName():
            Form.setObjectName(u"Form")
        Form.resize(758, 569)
        self.verticalLayout = QVBoxLayout(Form)
        self.verticalLayout.setSpacing(15)
        self.verticalLayout.setObjectName(u"verticalLayout")
        self.verticalLayout.setContentsMargins(-1, -1, -1, 20)
        card_widget = CardWidget(self)
        card_widget.setObjectName(u"card_widget")
        self.horizontalLayout_2 = QHBoxLayout(card_widget)
        self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
        self.label = TitleLabel(Form)
        self.label.setTextColor(QColor(0, 153, 198))
        self.label.setObjectName(u"label")
        sizePolicy = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
        self.label.setSizePolicy(sizePolicy)
        self.label.setAlignment(Qt.AlignmentFlag.AlignCenter)

        self.horizontalLayout_2.addWidget(self.label)


        # self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.verticalLayout.addWidget(card_widget)

        self.verticalSpacer = QSpacerItem(20, 15, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Fixed)

        self.verticalLayout.addItem(self.verticalSpacer)

        headLabel = ['Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width', 'Class']
        self.dataTable = TableWidget(Form)
        self.dataTable.setColumnCount(5)
        self.dataTable.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeMode.Stretch)  # 列头自适应
        self.dataTable.verticalHeader().setVisible(True)  # 显示垂直标题序号
        self.dataTable.setEditTriggers(QAbstractItemView.EditTrigger.NoEditTriggers)
        self.dataTable.setHorizontalHeaderLabels(headLabel)
        self.dataTable.setObjectName(u"dataTable")
        sizePolicy1 = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Expanding)
        sizePolicy1.setHorizontalStretch(0)
        sizePolicy1.setVerticalStretch(0)
        sizePolicy1.setHeightForWidth(self.dataTable.sizePolicy().hasHeightForWidth())
        self.dataTable.setSizePolicy(sizePolicy1)
        self.dataTable.setMinimumSize(QSize(0, 350))

        self.verticalLayout.addWidget(self.dataTable)

        self.horizontalLayout_3 = QHBoxLayout()
        self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
        self.horizontalLayout_3.setContentsMargins(10, 5, 10, -1)
        self.label_2 = BodyLabel(Form)
        self.label_2.setObjectName(u"label_2")
        sizePolicy2 = QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed)
        sizePolicy2.setHorizontalStretch(0)
        sizePolicy2.setVerticalStretch(0)
        sizePolicy2.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
        self.label_2.setSizePolicy(sizePolicy2)
        self.label_2.setMinimumSize(QSize(0, 26))

        self.horizontalLayout_3.addWidget(self.label_2)

        self.k_spinbox = SpinBox(Form)
        self.k_spinbox.setObjectName(u"k_spinbox")
        sizePolicy3 = QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Fixed)
        sizePolicy3.setHorizontalStretch(0)
        sizePolicy3.setVerticalStretch(0)
        sizePolicy3.setHeightForWidth(self.k_spinbox.sizePolicy().hasHeightForWidth())
        self.k_spinbox.setSizePolicy(sizePolicy3)
        self.k_spinbox.setMinimumSize(QSize(130, 35))
        self.k_spinbox.setValue(5)

        self.horizontalLayout_3.addWidget(self.k_spinbox)

        self.horizontalSpacer = QSpacerItem(50, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum)

        self.horizontalLayout_3.addItem(self.horizontalSpacer)

        self.label_3 = BodyLabel(Form)
        self.label_3.setObjectName(u"label_3")
        sizePolicy2.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
        self.label_3.setSizePolicy(sizePolicy2)
        self.label_3.setMinimumSize(QSize(0, 35))

        self.horizontalLayout_3.addWidget(self.label_3)

        self.acc_linEdit = LineEdit(Form)
        self.acc_linEdit.setPlaceholderText("100.0%")
        self.acc_linEdit.setReadOnly(True)
        self.acc_linEdit.setObjectName(u"acc_linEdit")
        sizePolicy4 = QSizePolicy(QSizePolicy.Policy.Maximum, QSizePolicy.Policy.Fixed)
        sizePolicy4.setHorizontalStretch(0)
        sizePolicy4.setVerticalStretch(0)
        sizePolicy4.setHeightForWidth(self.acc_linEdit.sizePolicy().hasHeightForWidth())
        self.acc_linEdit.setSizePolicy(sizePolicy4)
        self.acc_linEdit.setMinimumSize(QSize(120, 35))
        self.acc_linEdit.setMaximumSize(QSize(100, 16777215))

        self.horizontalLayout_3.addWidget(self.acc_linEdit)


        self.verticalLayout.addLayout(self.horizontalLayout_3)

        self.horizontalLayout = QHBoxLayout()
        self.horizontalLayout.setSpacing(15)
        self.horizontalLayout.setObjectName(u"horizontalLayout")
        self.horizontalLayout.setContentsMargins(10, 5, 10, -1)
        self.btn_loadTrain_data = PushButton("载入训练数据")
        self.btn_loadTrain_data.setObjectName(u"btn_loadTrainingData")
        sizePolicy3.setHeightForWidth(self.btn_loadTrain_data.sizePolicy().hasHeightForWidth())
        self.btn_loadTrain_data.setSizePolicy(sizePolicy3)
        self.btn_loadTrain_data.setMinimumSize(QSize(0, 45))
        self.btn_loadTrain_data.setIcon(FluentIcon.ADD)
        self.btn_train = PushButton(Form)
        self.btn_train.setIcon(FluentIcon.ROBOT)
        self.btn_train.setObjectName(u"btn_train")
        sizePolicy3.setHeightForWidth(self.btn_train.sizePolicy().hasHeightForWidth())
        self.btn_train.setSizePolicy(sizePolicy3)
        self.btn_train.setMinimumSize(QSize(0, 45))
        self.horizontalLayout.addWidget(self.btn_loadTrain_data)


        self.btn_loadTest_data = PushButton(Form)
        self.btn_loadTest_data.setIcon(FluentIcon.ADD)
        self.btn_loadTest_data.setObjectName(u"btn_load_data")
        sizePolicy3.setHeightForWidth(self.btn_loadTest_data.sizePolicy().hasHeightForWidth())
        self.btn_loadTest_data.setSizePolicy(sizePolicy3)
        self.btn_loadTest_data.setMinimumSize(QSize(0, 45))



        self.btn_ana = PushButton(Form)
        self.btn_ana.setIcon(FluentIcon.IOT)
        self.btn_ana.setObjectName(u"btn_ana")
        sizePolicy3.setHeightForWidth(self.btn_ana.sizePolicy().hasHeightForWidth())
        self.btn_ana.setSizePolicy(sizePolicy3)
        self.btn_ana.setMinimumSize(QSize(0, 45))

        self.horizontalLayout.addWidget(self.btn_ana)
        self.horizontalLayout.addWidget(self.btn_train)
        self.horizontalLayout.addWidget(self.btn_loadTest_data)
        self.btn_indentify = PrimaryPushButton(Form)
        self.btn_indentify.setIcon(FluentIcon.UPDATE)
        self.btn_indentify.setObjectName(u"btn_indentify")
        sizePolicy3.setHeightForWidth(self.btn_indentify.sizePolicy().hasHeightForWidth())
        self.btn_indentify.setSizePolicy(sizePolicy3)
        self.btn_indentify.setMinimumSize(QSize(0, 45))

        self.horizontalLayout.addWidget(self.btn_indentify)


        self.verticalLayout.addLayout(self.horizontalLayout)


        self.retranslateUi(Form)

        QMetaObject.connectSlotsByName(Form)
    # setupUi

    def retranslateUi(self, Form):
        Form.setWindowTitle(QCoreApplication.translate("Form", u"Form", None))
        self.label.setText(QCoreApplication.translate("Form", u"\u57fa\u4e8eKNN\u7684\u9e22\u5c3e\u82b1\u79cd\u7c7b\u8bc6\u522b", None))
        self.label_2.setText(QCoreApplication.translate("Form", u"K\u503c\uff1a", None))
        self.label_3.setText(QCoreApplication.translate("Form", u"\u9884\u6d4b\u51c6\u786e\u7387:", None))
        self.btn_train.setText(QCoreApplication.translate("Form", u"\u6a21\u578b\u8bad\u7ec3", None))
        self.btn_loadTest_data.setText(QCoreApplication.translate("Form", u"\u8f7d\u5165\u6d4b\u8bd5\u6570\u636e", None))
        self.btn_ana.setText(QCoreApplication.translate("Form", u"\u63a2\u7d22\u6027\u5206\u6790", None))
        self.btn_indentify.setText(QCoreApplication.translate("Form", u"\u8bc6\u522b\u9a8c\u8bc1", None))
    # retranslateUi

